package com.cn.kabalifeuser.ui.service.adapter;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.cn.kabalifeuser.R;
import com.cn.kabalifeuser.ui.integral.bean.TypeListBean;
import com.cn.kabalifeuser.ui.my.bean.CooperationSreviceListBean;

import java.util.List;

/**
 * Created by 晓林 on 2020/9/11.
 * function:
 */
public class TypeLeftBusinessAdapter extends BaseQuickAdapter<CooperationSreviceListBean.ResultBean, BaseViewHolder> {

    public TypeLeftBusinessAdapter(int layoutResId, @Nullable List<CooperationSreviceListBean.ResultBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, final CooperationSreviceListBean.ResultBean item) {
        TextView tvTitle = helper.getView(R.id.tv_name);
        ImageView img_left = helper.getView(R.id.img_left);
        tvTitle.setText(item.getTitle());
        if (item.isCheck()) {
            tvTitle.setTextColor(this.mContext.getResources().getColor(R.color.font_000));
            img_left.setVisibility(View.VISIBLE);
        } else {
            tvTitle.setTextColor(this.mContext.getResources().getColor(R.color.text_666666));
            img_left.setVisibility(View.GONE);
        }
    }


}
